{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车信息</small></h1>
        <ol class="breadcrumb">
          <li><a href="/manager/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 房车信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          查看房车信息 
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <form class="form-horizontal" role="form" action="/caravancontrol/list" method="get">
          <div class="form-group col-sm-2" style="margin-right:10px;">
            <label for="">选择营地</label>
            <select class="form-control" name="services">
            <option value="">全部</option>
            {volist name='campinfos' id='vo'}
            {if input('services')==$vo['id']}
            <option value="{$vo.id}" selected>{$vo.name}</option>
            {else}
            <option value="{$vo.id}">{$vo.name}</option>
            {/if}
            {/volist}
            </select>
          </div>
          <div class="form-group col-sm-1" style="margin-right:10px;">
            <label for="">审核状态</label>
            <select class="form-control" name="status">
            <option value="" selected>全部</option>
              {if input('status')==='0'}
              <option value="0" selected>待审核</option>
              {else/}
              <option value="0">待审核</option>
              {/if}
              {if input('status')==1}
              <option value="1" selected>审核通过</option>
              {else/}
              <option value="1">审核通过</option>
              {/if}
              {if input('status')==-99}
              <option value="-99" selected>未通过审核</option>
              {else/}
              <option value="-99">未通过审核</option>
              {/if}
            </select>
          </div>
          <div class="form-group col-sm-1 input-group" style="margin-right:10px;">
            <label for="">搜索条件</label>
            <select class="form-control" name="searchfield">
              <option value="name">房车名称</option>
              <option value="number">房车编号</option>
              <option value="integral">参考价格</option>
              <option value="camp_name">旅行币基数</option>
              <option value="">无</option>
            </select>
          </div>
          <div class="form-group col-sm-2 input-group" style="margin-right:10px;">
            <label for="">&nbsp;</label>
            <label for="">请输入搜索条件关键字</label>
            <input class="form-control" type="text" placeholder="请输入关键信息" value="{:input('keyword')}" name="keyword">
            <label for="">&nbsp;</label>
            <span class="input-group-btn">
              <button class="btn btn-default" type="submit">搜索</button>
            </span>
          </div>
          <div class="clearfix"></div>
        </form>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th>房车编号</th>
                <th>房车名称</th>
                <th>营地名称</th>
                <th>泊位编号</th>
                <th>房车品牌</th>
                <th>参考价格</th>
                <th>旅行币基数</th>
                <!-- <th>分享状态</th> -->
                <th>审核状态</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <form  class="form-horizontal" role="form" action="" >
            {volist name='list' id='vo'}
              <tr>
                <td>{$vo.number}</td>
                <td>{$vo.name}</td>
                <td>{$vo.campcontrols.name}</td>
                <td>{$vo.park_num}</td>
                <td>{$vo->getBrands($vo['car_brands_id'])}</td>
                <td>{$vo.integral}</td>
                <td>{$vo.campcontrols.travel_money_base}</td>
                <!-- <td></td> -->
                <td>{$vo->getStatus($vo['status'])}</td>
                <td><a href="/caravancontrol/{$vo.id}/readinfo">查看详情</a> </td>
              </tr>
            {/volist}
            </form>
            </tbody>
          </table>
        </div>   
      </div>
      <div class="col-sm-12">
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
    </div>
  </div><!-- /#page-wrapper -->
